import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息

public class Main {
    public static void main(String[] args) {
        int count = 0;
        int i = 0;
        Scanner in = new Scanner(System.in);
        int num = in.nextInt();
        int number1 = num;

        while(num != 0) {
            count++;
            num /= 10;
            //记录一共多少位数
        }

        for(i = 0;i < count; i++) {
            int number = number1 % 10;
            System.out.print(number);
            number1 /= 10;

            if(i % 3 == 0 && i > 2) {
                System.out.print(",");
            }

        }
    }
}